<template>
<h1>El-下拉选框组件</h1>
  <el-select placeholder="请选择你喜欢的城市" style="width: 500px" v-model="city">
    <el-option label="西安" value="xa"></el-option>
    <el-option label="重庆" value="cq"></el-option>
    <el-option label="厦门" value="xm"></el-option>
    <el-option label="威海" value="wh"></el-option>
  </el-select>
  <h3>你选择的城市是：{{city}}</h3>
</template>

<script setup>
import {ref} from "vue";

//定义变量用来保存用户选择的城市
const city=ref('');
</script>

<style scoped>

</style>